package cn.itcast.zt.java8.tmp;

import cn.hutool.http.HttpUtil;
import cn.hutool.json.JSONUtil;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

public class Temp {
    public static void main(String[] args) {
        String res = HttpUtil.createPost("http://100.74.22.35:8000/v1/filesystemsusage ")
                .header("Content-Type", "application/json")
                .header("Date", "Tue, 22 Jul 2025 07:54:44 GMT")
                .header("Authorization", "AWS manager:6TAit4gw/g4yLGmp99UhmOt2Bhg=")
                .body("{\"pageSize\": 10,\"pageNum\": 1,\"domains\":[\"100.74.22.43\"]}")
                .execute().body();

        String triggerTime = "2025-09-28 00:00:00";
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
        System.out.println(LocalDateTime.parse(triggerTime, formatter));
        System.out.println(JSONUtil.toJsonPrettyStr(res));
    }
}